/* $Id: UserEntryDTO.java 137 2011-08-29 20:33:36Z altdotua@gmail.com $ */

package alt.djudge.frontend.shared.dto.admin;

import java.io.Serializable;
import java.util.Date;

public class UserEntryDTO extends AbstractAdminDTOEntry implements Serializable
{
	private static final long serialVersionUID = 1L;

	public String[] columnsData = new String[0];
	
	private boolean active;
	
	private boolean deleted;
	
	private boolean visible;
	
	private Date created;
	
	private Date updated;
	
	private Long id;
	
	public boolean isActive()
	{
		return active;
	}

	public void setActive(boolean active)
	{
		this.active = active;
	}

	public boolean isDeleted()
	{
		return deleted;
	}

	public void setDeleted(boolean deleted)
	{
		this.deleted = deleted;
	}

	public Date getCreated()
	{
		return created;
	}

	public void setCreateTime(Date created)
	{
		this.created = created;
	}

	public Date getUpdated()
	{
		return updated;
	}

	public void setUpdateTime(Date updated)
	{
		this.updated = updated;
	}

	public Long getId()
	{
		return id;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public boolean isVisible()
	{
		return visible;
	}

	public void setVisible(boolean visible)
	{
		this.visible = visible;
	}
	public String getOwnFieldValue(int column)
	{
		return columnsData[column];
	}
	
	@Override
	public void setData(String[] data)
	{
		this.columnsData = data;
	}
	
	public UserEntryDTO()
	{
		this.columnsData = new String[getFieldNames().length];
	}
	
	public UserEntryDTO(String[] data)
	{
		columnsData = data;
	}

	@Override
	public String[] getFieldNames()
	{
		return new String[]
		{ "ID", "Name", "Role", };
	}
}
